<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		div{
			text-align: center;
			background-color: white;
		}
	</style>
</head>
<body class="box">
	<button>开灯</button>
	<button>关灯</button>
	<div>
		<img src="../day02/image/05.jpg" alt="">
	</div>
</body>
<script src="../jquery-3.3.1.min.js"></script>
<script>

	// 先获取到两个button
	var btn = $("button");

	//获取div
	var div = $("div");

	

	//对这两个button分别加点击事件
	$(btn[0]).click(function(){

		console.log(1);

		// $(div).attr("background-color","white");

		$(div).css("background-color","white");


	}) 

	$(btn[1]).click(function(){

		// $(div).attr("background-color","black");

		$(div).css("background-color","black");

	}) 

</script>
</html>